<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
commit message 的任何一行不能超過 100 個字元! 這樣可以使得 commit message 更容易在 github 以及各種 git 工具中閱讀。
commit message 由header、 body 和 footer 組成,由空白行分隔。
代表 commit 的類別:
feat (功能特點)
fix (修 bug)
docs (文件)
style (格式排版, 缺少分號…)
refactor (重構)
test (當補上缺少的測試時)
chore (維護)
代表此 commit 的簡短描述
使用命令式, 使用現在式,例如: “change” 不要用 “changed” 也不要用 “changes”
text 第一個字母不要大寫
末尾沒有點 (.) 不要加句號
為必要欄位。
如同 使用命令式、現在式,例如:“change” 不是“changed”也不是“changes”
包括改變的動機和與以前行為的對比
更多說明:
BREAKING CHANGE: isolate scope bindings definition has changed and
the inject option for the directive controller injection was removed.
To migrate the code follow the example below:
Before:
scope: {
myAttr: 'attribute',
myBind: 'bind',
myExpression: 'expression',
myEval: 'evaluate',
myAccessor: 'accessor'
}
After:
scope: {
myAttr: '@',
myBind: '@',
myExpression: '&',
// myEval - usually not useful, but in cases where the expression is assignable, you can use '='
myAccessor: '=' // in directive's template change myAccessor() to myAccessor
}
The removed `inject` wasn't generaly useful for directives so there should be no code using it.
已關閉的錯誤應列在頁腳的單獨行中,並以“Closes”關鍵字為前綴,如下所示:Closes #234
或在多個問題的情況下:Closes #123, #245, #992
如果 commit 一個先前 commit 的還原 ,則其標頭應以 **revert:**
開頭,後面跟隨著 reverted commit 的標頭。
在 body 中它應該說:This reverts commit <hash>.
,其中 hash 是要恢復的提交的 SHA。
我們在變更日誌中使用這三個部分: new features, bug fixes, breaking changes.
此列表可以在發佈時由腳本生成。以及相關提交的鏈接。
當然,您可以在實際發布之前編輯此更改日誌,但它可以生成骨架。
自上次發布以來的所有主題列表(提交消息中的第一行):
>> git log <last tag> HEAD --pretty=format:%s
此版本中的新功能
>> git log <last release> HEAD --grep feature
這些是格式更改 (adding/removing spaces/empty lines, indentation), missing semi colons, comments.
所以當你在尋找一些改變時,你可以忽略這些提交 - 此提交中沒有邏輯更改。
一分為二一目了然, 您可以通過以下方式忽略這些:
>> git bisect skip $(git rev-list --grep irrelevant <good place> HEAD)
這將添加一種“context”資訊。
看看這些資訊 (取自最近幾個 Angular 的提交):
所有這些資訊都試圖指出它更改了哪裡。 但是他們缺少了規範...
看看這些資訊:
你能猜出裡面是什麼嗎?這些消息錯過了地方規範...These messages miss place specification...
所以也許像代碼的一部分:docs, docs-parser, compiler, scenario-runner, …
我知道,您可以通過檢查哪些文件已更改來找到此資訊,但這很慢。 在查看 git 歷史紀錄時,我可以看到我們所有人都試圖指出癥結點,但卻缺少了規範。
feat($browser): onUrlChange event (popstate/hashchange/polling)
Added new event to $browser:
- forward popstate event if available
- forward hashchange event if popstate not available
- do polling when neither popstate nor hashchange available
Breaks $browser.onHashChange, which was removed (use onUrlChange instead)
fix($compile): couple of unit tests for IE9
Older IEs serialize html uppercased, but IE9 does not...
Would be better to expect case insensitive, unfortunately jasmine does
not allow to user regexps for throw expectations.
Closes #392
Breaks foo.bar api, foo.baz should be used instead
feat(directive): ng:disabled, ng:checked, ng:multiple, ng:readonly, ng:selected
New directives for proper binding these attributes in older browsers (IE).
Added coresponding description, live examples and e2e tests.
Closes #351
style($location): add couple of missing semi colons
docs(guide): updated fixed docs from Google Docs
Couple of typos fixed:
- indentation
- batchLogbatchLog -> batchLog
- start periodic checking
- missing brace
feat($compile): simplify isolate scope bindings
Changed the isolate scope binding options to:
- @attr - attribute binding (including interpolation)
- =model - by-directional model binding
- &expr - expression execution binding
This change simplifies the terminology as well as
number of choices available to the developer. It
also supports local name aliasing from the parent.
BREAKING CHANGE: isolate scope bindings definition has changed and
the inject option for the directive controller injection was removed.
To migrate the code follow the example below:
Before:
scope: {
myAttr: 'attribute',
myBind: 'bind',
myExpression: 'expression',
myEval: 'evaluate',
myAccessor: 'accessor'
}
After:
scope: {
myAttr: '@',
myBind: '@',
myExpression: '&',
// myEval - usually not useful, but in cases where the expression is assignable, you can use '='
myAccessor: '=' // in directive's template change myAccessor() to myAccessor
}
The removed `inject` wasn't generaly useful for directives so there should be no code using it.
參考:
不好意思,有個小小的問題想要請教。
關於[2-1 Commit Message的格式]中的內容,是打在commit的哪個部份呢?
因為commit有分Subject跟Description,
還是說第一行要打在Subject,第二行之後打在Description呢?
麻煩大大解惑,感謝